import os
os.environ["PYTHONCASEOK"]="1"
import ET,sys,string
class ErrorFile:
	def __init__(self):
		self.__data=''
	def write(self,data):
		self.__data=self.__data+data
		if '\n' in data:
			lines=string.split(self.__data,'\n')
			for line in lines[:-1]:
				ET.WriteErrorLog(line)
			self.__data=lines[-1]

sys.stderr=sys.stdout=ErrorFile()
#print "Init python..."
import RegisterInit
from KeyHandler import MakeKeyHandler
import Editor
def GetKeyHandler(etdict):
	keyhandler=MakeKeyHandler(etdict['editor'])
	Editor.SetEditor(etdict['editor'])
	return keyhandler
#import PrefsDialog,ProjAttsDialog
#print "...done init python"
